﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace University.Workshop.Model
{
    public class ProductCost
    {
        public string NameProduct { get; set; }
        public float Cost { get; set; }
        public Product Product { get; set; }

        public void SetProduct(Product product)
        {
            if (product == null)
                throw new ArgumentNullException("product");
            this.Product = product;
            NameProduct = product.NameProduct;
            Cost = Convert.ToInt64(product.CostSale,CultureInfo.InvariantCulture);
        }
    }
}
